package com.hunsy.firstspringbootdemo;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author liuzw
 * @date 2020/5/15 11:52
 */
@RestController
public class HelloController {


  @GetMapping("hello")
  public String hello(@RequestParam(value = "name", defaultValue = "World") String name) {

    return String.format ("Hello %s", name);
  }
}
